package com.trkj.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the DRUGSTORAGE_BATCHNUMBER database table.
 * 
 */
@Entity
@Table(name="DRUGSTORAGE_BATCHNUMBER")
@NamedQuery(name="DrugstorageBatchnumber.findAll", query="SELECT d FROM DrugstorageBatchnumber d")
public class DrugstorageBatchnumber implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="BATCHNUMBER_ID")
	private long batchnumberId;

	@Column(name="BACTCHNUMBER_NAME")
	private String bactchnumberName;

	@Column(name="DRUGSTORAGE_ALLACTUALCOST")
	private BigDecimal drugstorageAllactualcost;

	@Column(name="DRUGSTORAGE_ALLCOST")
	private BigDecimal drugstorageAllcost;

	@Temporal(TemporalType.DATE)
	@Column(name="DRUGSTORAGE_DATE")
	private Date drugstorageDate;

	//bi-directional many-to-one association to DrugstorageGetdrugsDetail
	@OneToMany(mappedBy="drugstorageBatchnumber")
	private List<DrugstorageGetdrugsDetail> drugstorageGetdrugsDetails;

	//bi-directional many-to-one association to DrugstorageHasdrug
	@OneToMany(mappedBy="drugstorageBatchnumber")
	private List<DrugstorageHasdrug> drugstorageHasdrugs;

	public DrugstorageBatchnumber() {
	}

	public long getBatchnumberId() {
		return this.batchnumberId;
	}

	public void setBatchnumberId(long batchnumberId) {
		this.batchnumberId = batchnumberId;
	}

	public String getBactchnumberName() {
		return this.bactchnumberName;
	}

	public void setBactchnumberName(String bactchnumberName) {
		this.bactchnumberName = bactchnumberName;
	}

	public BigDecimal getDrugstorageAllactualcost() {
		return this.drugstorageAllactualcost;
	}

	public void setDrugstorageAllactualcost(BigDecimal drugstorageAllactualcost) {
		this.drugstorageAllactualcost = drugstorageAllactualcost;
	}

	public BigDecimal getDrugstorageAllcost() {
		return this.drugstorageAllcost;
	}

	public void setDrugstorageAllcost(BigDecimal drugstorageAllcost) {
		this.drugstorageAllcost = drugstorageAllcost;
	}

	public Date getDrugstorageDate() {
		return this.drugstorageDate;
	}

	public void setDrugstorageDate(Date drugstorageDate) {
		this.drugstorageDate = drugstorageDate;
	}

	public List<DrugstorageGetdrugsDetail> getDrugstorageGetdrugsDetails() {
		return this.drugstorageGetdrugsDetails;
	}

	public void setDrugstorageGetdrugsDetails(List<DrugstorageGetdrugsDetail> drugstorageGetdrugsDetails) {
		this.drugstorageGetdrugsDetails = drugstorageGetdrugsDetails;
	}

	public DrugstorageGetdrugsDetail addDrugstorageGetdrugsDetail(DrugstorageGetdrugsDetail drugstorageGetdrugsDetail) {
		getDrugstorageGetdrugsDetails().add(drugstorageGetdrugsDetail);
		drugstorageGetdrugsDetail.setDrugstorageBatchnumber(this);

		return drugstorageGetdrugsDetail;
	}

	public DrugstorageGetdrugsDetail removeDrugstorageGetdrugsDetail(DrugstorageGetdrugsDetail drugstorageGetdrugsDetail) {
		getDrugstorageGetdrugsDetails().remove(drugstorageGetdrugsDetail);
		drugstorageGetdrugsDetail.setDrugstorageBatchnumber(null);

		return drugstorageGetdrugsDetail;
	}

	public List<DrugstorageHasdrug> getDrugstorageHasdrugs() {
		return this.drugstorageHasdrugs;
	}

	public void setDrugstorageHasdrugs(List<DrugstorageHasdrug> drugstorageHasdrugs) {
		this.drugstorageHasdrugs = drugstorageHasdrugs;
	}

	public DrugstorageHasdrug addDrugstorageHasdrug(DrugstorageHasdrug drugstorageHasdrug) {
		getDrugstorageHasdrugs().add(drugstorageHasdrug);
		drugstorageHasdrug.setDrugstorageBatchnumber(this);

		return drugstorageHasdrug;
	}

	public DrugstorageHasdrug removeDrugstorageHasdrug(DrugstorageHasdrug drugstorageHasdrug) {
		getDrugstorageHasdrugs().remove(drugstorageHasdrug);
		drugstorageHasdrug.setDrugstorageBatchnumber(null);

		return drugstorageHasdrug;
	}

}